package com.mc.read.adminapi.controller;

import com.mc.read.adminapi.service.LoginService;
import com.mc.read.vo.request.BaseRequest;
import com.mc.read.vo.respose.BaseRespose;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author liuhao
 * @date 2019/6/12 10:16
 */
@Controller
@RequestMapping(value = "/login")
@Slf4j
public class LoginController {
    @Autowired
    LoginService loginService;

    /**
     * @Author:LiuHao
     * @Date:15:24 2019/5/31
     * 员工登录 userLogin
     **/
    @ResponseBody
    @RequestMapping(value = "userLogin", method = RequestMethod.POST)
    public BaseRespose userLogin(@RequestBody BaseRequest baseRequest) {
        BaseRespose baseRespose = loginService.userLogin(baseRequest);
        return baseRespose;
    }

}
